<script type="text/javascript">

$(function() {
    $("table tr:nth-child(odd)").addClass("striped");//.hover(function(){this.removeClass("striped")});
});



</script>

<style>
    tr.striped {
        background-color: #EEEEEE;
}
</style>

<h2> list of categories in type: <?=$this->category_type ?></h2>
<table border = '1' width='100%'>
	<tr>
		<td>
			ID
		</td>
		<td>
			Title
		</td>
		<td>
			Parent ID
		</td>
		<td>
			Description
		</td>
		<td>
			Tree Path
		</td>
		<td>
			Operation
		</td>
	</tr>
	<? foreach ($this->categoryList as $row) :?>
	<tr>
		<td>
			#<?=$row['id']?>
		</td>
		<td>
			<a href="/en/category/index/view?id=<?=$row['id']?>&type=<?=$this->category_type ?>" > <?=$row['name'] ?></a>
		</td>
		<td>
			<?=$row['pid'] ?>
		</td>
		<td>
			<?=$row['description']?>
		</td>
		<td>
			<?=$row['tree_path']?>
		</td>
		<td ><a href="/en/category/index/edit?id=<?=$row['id']?>&type=<?=$this->category_type ?>">edit</a> |
            <a href="/en/category/index/delete?id=<?=$row['id']?>&type=<?=$this->category_type ?>">delete</a>
        </td> 
	</tr>
	<?endforeach ?>
</table>
